home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / pangomm-1.4 / pangomm / fontset.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-20  |  4.1 KB  |  155 lines

  1. // -*- c++ -*-
  2. // Generated by gtkmmproc -- DO NOT MODIFY!
  3. #ifndef _PANGOMM_FONTSET_H
  4. #define _PANGOMM_FONTSET_H
  5.  
  6. #include <glibmm.h>
  7.  
  8. /* $Id: fontset.hg,v 1.2 2004/03/03 01:07:40 murrayc Exp $ */
  9.  
  10. /* fontset.h
  11.  *
  12.  * Copyright 2001      The gtkmm Development Team
  13.  *
  14.  * This library is free software; you can redistribute it and/or
  15.  * modify it under the terms of the GNU Library General Public
  16.  * License as published by the Free Software Foundation; either
  17.  * version 2 of the License, or (at your option) any later version.
  18.  *
  19.  * This library is distributed in the hope that it will be useful,
  20.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  22.  * Library General Public License for more details.
  23.  *
  24.  * You should have received a copy of the GNU Library General Public
  25.  * License along with this library; if not, write to the Free
  26.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  27.  */
  28.  
  29. #include <glibmm/object.h>
  30. #include <pangomm/language.h>
  31. #include <pangomm/font.h>
  32. #include <pangomm/fontmetrics.h>
  33. #include <pango/pango-fontset.h>
  34.  
  35.  
  36. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  37. typedef struct _PangoFontset PangoFontset;
  38. typedef struct _PangoFontsetClass PangoFontsetClass;
  39. #endif /* DOXYGEN_SHOULD_SKIP_THIS */
  40.  
  41.  
  42. namespace Pango
  43. { class Fontset_Class; } // namespace Pango
  44. namespace Pango
  45. {
  46.  
  47. /** A Pango::Fontset is used to represent a set of fonts.
  48.  */
  49.  
  50. class Fontset : public Glib::Object
  51. {
  52.   
  53. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  54.  
  55. public:
  56.   typedef Fontset CppObjectType;
  57.   typedef Fontset_Class CppClassType;
  58.   typedef PangoFontset BaseObjectType;
  59.   typedef PangoFontsetClass BaseClassType;
  60.  
  61. private:  friend class Fontset_Class;
  62.   static CppClassType fontset_class_;
  63.  
  64. private:
  65.   // noncopyable
  66.   Fontset(const Fontset&);
  67.   Fontset& operator=(const Fontset&);
  68.  
  69. protected:
  70.   explicit Fontset(const Glib::ConstructParams& construct_params);
  71.   explicit Fontset(PangoFontset* castitem);
  72.  
  73. #endif /* DOXYGEN_SHOULD_SKIP_THIS */
  74.  
  75. public:
  76.   virtual ~Fontset();
  77.  
  78. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  79.   static GType get_type()      G_GNUC_CONST;
  80.   static GType get_base_type() G_GNUC_CONST;
  81. #endif
  82.  
  83.   ///Provides access to the underlying C GObject.
  84.   PangoFontset*       gobj()       { return reinterpret_cast<PangoFontset*>(gobject_); }
  85.  
  86.   ///Provides access to the underlying C GObject.
  87.   const PangoFontset* gobj() const { return reinterpret_cast<PangoFontset*>(gobject_); }
  88.  
  89.   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  90.   PangoFontset* gobj_copy();
  91.  
  92. private:
  93.  
  94.  
  95. public:
  96.   
  97.   /** Returns the font in the fontset that contains the best glyph for the
  98.    * unicode character wc.
  99.    * @param wc A unicode character.
  100.    * @return A Pango::Font. The caller must call g_object_unref when finished
  101.    * with the font.
  102.    */
  103.   Glib::RefPtr<Font> get_font(guint wc) const;
  104.   
  105.   /** Get overall metric information for the fonts in the fontset.
  106.    * @return A Pango::FontMetrics object. The caller must call pango_font_metrics_unref()
  107.    * when finished using the object.
  108.    */
  109.   FontMetrics get_metrics() const;
  110.  
  111.   /** For instance,
  112.    * bool on_foreach(const Glib::RefPtr<Pango::Font>& font);
  113.    */
  114.   typedef sigc::slot< bool, const Glib::RefPtr<Font>& > ForeachSlot;
  115.  
  116.   /** Iterates through all the fonts in a fontset, calling @a slot for
  117.    * each one. If @a slot returns true, that stops the iteration.
  118.    *
  119.    * Since: 1.4
  120.    *
  121.    * @param slot Callback function
  122.    */
  123.   void foreach(const ForeachSlot& slot);
  124.   
  125.  
  126. public:
  127.  
  128. public:
  129.   //C++ methods used to invoke GTK+ virtual functions:
  130.  
  131. protected:
  132.   //GTK+ Virtual Functions (override these to change behaviour):
  133.  
  134.   //Default Signal Handlers::
  135.  
  136.  
  137. };
  138.  
  139. } /* namespace Pango */
  140.  
  141.  
  142. namespace Glib
  143. {
  144.   /** @relates Pango::Fontset
  145.    * @param object The C instance
  146.    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
  147.    * @result A C++ instance that wraps this C instance.
  148.    */
  149.   Glib::RefPtr<Pango::Fontset> wrap(PangoFontset* object, bool take_copy = false);
  150. }
  151.  
  152.  
  153. #endif /* _PANGOMM_FONTSET_H */
  154.  
  155.